Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

270
Views
Error de Nodejs Koa Framework [ERR_HTTP_HEADERS_SENT]: no se pueden establecer encabezados después de enviarlos al cliente

Saludos a todos soy nuevo en NodeJS y me sale este error "Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client" y se en que linea de codigo aparece ese error pero no se como arreglalo. alguien me puede ayudar aqui esta el codigo

 router.get("(.*)", async (ctx) => { try { const shop = ctx.query.shop; let user = await Shopify_custom_session_storage.findAll({ raw: true, where:{ shop: shop }, limit:1 }); //This shop hasn't been seen yet, go through OAuth to create a sessrsion if (user.length == 0 || user[0].shop == undefined) { ctx.redirect(`/auth?shop=${shop}`); }else{ await handleRequest(ctx); ctx.session.userData = { // Problem appears here shop: user[0].shop, accessToken: user[0].accessToken }; } // if (ACTIVE_SHOPIFY_SHOPS[shop] == undefined) { // ctx.redirect(`/auth?shop=${shop}`); // } else { // await handleRequest(ctx); // } } catch(err) { console.log(err); throw err; } });
about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Lo lograste solucionar?

about 4 years ago · Nicolas David Estevez Tovar Report

0

about 4 years ago · Nicolas David Estevez Tovar Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!